#coding=utf-8
#author__ = "jack"

#子urls模块
from django.urls import path, include, re_path
from django.contrib.auth import views as auth_views
from rest_framework_swagger.views import get_swagger_view
from webuser.views import *
#import webuser.views
#from rest_framework import routers

schema_view = get_swagger_view(title='rest_framework_swagger')

# urlpatterns = patterns('webuser.views',
#     url(r'^usercreate/$', UserBaseCreate.as_view(), name='usercreate'),
#     url(r'^userlist/$', UserBaseList.as_view(), name='userlist'),
#     # url(r'^userdetail/(?P<pk>[0-9]+)/$', views.user_detail, name='user_detail'),
#     url(r'^userdetail/(?P<pk>[0-9]+)/$', UserBserDetail.as_view(), name='user_detail'),
#     url(r'^docs/', include('rest_framework_swagger.urls'))

urlpatterns = [
    re_path(r'usercreate/', UserBaseCreate.as_view(), name='usercreate'),
    re_path(r'userlist/', UserBaseList.as_view(), name='userlist'),
    # re_path(r'^userdetail/(?P<pk>[0-9]+)/$', views.user_detail, name='user_detail'),
    re_path(r'^userdetail/(?P<pk>[0-9]+)/$', UserBserDetail.as_view(), name='user_detail'),
    path('docs/', schema_view),
    ]